package com.ychug.framework.util;

import com.ychug.framework.core.advice.AdDirective;
import com.ychug.framework.core.advice.NewsDataListDirective;
import com.ychug.framework.util.SpringUtils;
import org.springframework.context.MessageSource;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by OF on 2018/5/13.
 */
public class FreemarkerUtile {

    public static Map initTemplate(){
        Map data = new HashMap();
//        data.put("like",new likeDirective());
//        data.put("column",new ColumnDirective());
//        data.put("content",new ContentDirective());
//        data.put("content_list",new ContentListDirective());
        AdDirective tAdDirective = SpringUtils.getBean(AdDirective.class);
        data.put("ad", tAdDirective);
        NewsDataListDirective newsDataListDirective = SpringUtils.getBean(NewsDataListDirective.class);
        data.put("news_list", newsDataListDirective);
//        data.put("announce",new AnnounceDirective());
//        data.put("page",new PageDirective());
//        data.put("topic",new TopicDirective());
//        data.put("system",new SystemDirective());
//        data.put("bbs",new BbsListDirective());
//        data.put("comment",new CommentListDirective());
        return  data;
    }
}
